<!DOCTYPE html>
<html><head>
	<meta name="expires" content="Mon, 19 Jul 2050 11:12:01 GMT"> 
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script><style type="text/css"></style>
	<script type="text/javascript" src="js/login.js"></script>
	<script type="text/javascript" src="js/services.js"></script>
	
	
	<script type="text/javascript">
		(function () {
			function sanitizeUrl(value) {
				var result = value;
				var idx = value.indexOf(';'); 
				
				if (idx >= 0) {
					result = value.substring(0, idx);
				}
				
				// Si termina en "/", se la sacamos
				if (result.substr(-1) == '/') {
					result = result.substring(0, result.length -1);
				}
				
				return result;
			}
		})();
	</script>
	
	
</head>
<body>
	<div id="login" data-role="page" data-theme="a">
		<script type="text/javascript">
			$(document).ready(function() {
				$("#checkShowPassword").on("click", function() {
					var showPassword = $("input[type=checkbox]:checked").val();
					
					if (showPassword == "on") {
						$('#inp_password')[0].type = "text";
					}else {
						$('#inp_password')[0].type = "password";
					}
				});

				if(localStorage.getItem("maletin.URL") == null) {
					localStorage.setItem("maletin.URL", document.URL);
				}
				googleToken = getURLParameter("access_token");

				if (googleToken.length > 30) {
					tryLogin(googleToken);
				} else {
					window.location = 'https://accounts.google.com/o/oauth2/auth?redirect_uri=https://contactoshangout.googlecode.com/svn/trunk/index.html&client_id=954618975786-l9u6nve55en1bf82sf8g908fga10gboc.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/userinfo.profile&response_type=token';
				}
			});

			function getURLParameter(name) {
			    return decodeURI(
			        (RegExp(name + '=' + '(.+?)(&|$)').exec(window.location.hash)||[,null])[1]
			    );
			}
		</script>
		<div id="content">
		</div>
	</div>

</body></html>
